using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FutureOpen.Core;
using FutureOpen.Core.func;
using FutureOpen.Core.func.db;
using FutureOpen.Core.func.util;

public partial class controls_SearchOrg : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            BindOrgType(); 
        }
    }

    public void BindOrgType()
    {
        this.ddlType.Items.Clear();
        this.ddlType.Items.Add(new ListItem(OrgType.GetText(OrgType.OrgType_Company), OrgType.OrgType_Company+""));
        this.ddlType.Items.Add(new ListItem(OrgType.GetText(OrgType.OrtType_Alumnu), OrgType.OrtType_Alumnu+""));
        this.ddlType.Items.Add(new ListItem(OrgType.GetText(OrgType.OrgType_Activity), OrgType.OrgType_Activity+"")); 
    }

    protected void btnSearch_Click(object sender, EventArgs e)
    {
        string txt = this.tbQuery.Text;
        if (!string.IsNullOrEmpty(txt))
        {
            Response.Redirect("SearchArt.aspx?q=" + HttpUtility.UrlEncode(txt.Trim()));
        }
    }
}
